﻿#include "msgprocess.h"

MsgProcess::MsgProcess(QThread *parent) :QThread(parent)
{
    m_isExit = true;
}

void MsgProcess::exitThread(void)
{
    m_isExit = false;
}

void MsgProcess::run(void)
{
    while (m_isExit)
    {
        //取出消息队列中的命令进行解析
        if (!GlobalVars::g_msgQueue.isEmpty())//消息队列非空
        {
            QString msg = GlobalVars::g_msgQueue.dequeue();
            parseUserAsk(msg);
        }
        msleep(20);
    }
}

/**
 * @brief MsgProcess::parseUserAsk
 * @param msg
 * @作用: 解析msg
 */
void MsgProcess::parseUserAsk(QString msg)
{

}

